package br.eck.model.base.weapons;

import java.util.ArrayList;
import java.util.List;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

import br.eck.model.game.SpaceShip;

public class DoubleStandardLaserGun extends Weapon {
    private static int shootDistance = 35;

    public DoubleStandardLaserGun(SpaceShip ship) throws SlickException {
        super(ship);
        setShootImage(new Image("img/shoots/lightLaser.png"));
        setName("Double light laser");
        setReady(true);
    }

    @Override
    public List<Shoot> fire() {

        List<Shoot> shoots = new ArrayList<Shoot>();
        StandardLaserShoot shoot = new StandardLaserShoot(getShootImage());
        shoot.setAtk(20);
        shoot.setShip(getShip());
        shoot.setPositionAsShip();
        shoot.setX(shoot.getX() - shootDistance);

        shoots.add(shoot);
        shoot = new StandardLaserShoot(getShootImage());
        shoot.setAtk(20);
        shoot.setShip(getShip());
        shoot.setPositionAsShip();
        shoot.setX(shoot.getX() + shootDistance);

        shoots.add(shoot);
        return shoots;
    }

    @Override
    public void update(int timePassed) {
        setReady(true);
    }

}
